<!-- TAB切换 -->

<template>
  <div class="f-tab" :class="{ small: size == 'small' }">
    <div class="f-tab-bd">
      <div
        class="f-tab-bd__item"
        :class="{ selected: item.key == current }"
        v-for="item in list"
        :key="item.key"
        @click="handleClickItem(item.key)"
      >
        <slot name="tab" :data="item">
          <span>{{ item.label }}</span>
        </slot>
      </div>
      <div class="f-tab-bd__cursor" v-if="false"></div>
    </div>
    <div class="f-tab-slot">
      <slot></slot>
</div>
</div>
</template>

<script src="./script.js"></script>
<style lang="less" src="./style.less" scoped></style>
